package edu.nf.controller.hotel;

import edu.nf.controller.BaseController;
import edu.nf.hotel.cityroomhotel.CityRoomHotel;
import edu.nf.hotel.cityroomhoteldao.CityRoomHotelDao;
import edu.nf.hotel.cityroomhoteldao.impl.CityRoomHotelDaoImpl;
import edu.nf.hotel.region.HotelInformation;
import edu.nf.hotel.regiondao.HotelInformationDao;
import edu.nf.hotel.regiondao.impl.HotelInformationDaoImpl;
import edu.nf.hotel.vo.ResultVO;
import org.nf.web.annotation.RequestMapping;
import org.nf.web.annotation.RequestParam;
import org.nf.web.servlet.View;
import org.nf.web.servlet.view.JsonView;

import java.util.List;

/**
 * @Date 2023-07-03
 * @Author 带土
 */
public class HotelInformationController extends BaseController {

    @RequestMapping("/hotel/list")
    public View getAll(){
        HotelInformationDao dao = new HotelInformationDaoImpl();
        ResultVO<List<HotelInformation>> vo = new ResultVO<>(0,"成功",dao.getAllHotelInformation());
        return new JsonView(vo);
    }
}
